package co.fitstart.weapp.api.service;

import java.util.List;

import co.fitstart.entity.coupon.Coupon;
import co.fitstart.entity.order.Order;
import co.fitstart.entity.user.User;

/**
 * 
 * @author dan
 *
 */
public interface CouponService{
    
    /**
     * 
     * @param user
     * @return
     */
    public List<Coupon> listCoupon(User user);
    
    /**
     * 
     * @param order
     * @return
     */
    public List<Coupon> listCoupon(Order order);
    
    /**
     * 
     * @param couponId
     * @return
     */
    public Coupon load(Long couponId);
    
    /**
     * 
     * @param coupon
     * @param from
     * @param to
     */
    public void give(Coupon coupon, User from, User to);

    /**
     * 
     * @param coupon
     * @param from
     * @param name
     * @param mobile
     */
    public void give(Coupon coupon, User from, String name, String mobile);

    /**
     * 
     * @param user
     * @param available
     * @return
     */
    public List<Coupon> list(User user, boolean available);
}
